<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Data Bind: ng-model</title>
    <script type="text/javascript" src="../angular.js"></script>
</head>
<body>
    <div>用户名：<input type="text" name="uname" id="uname" /></div>
    <div><span id="info"></span></div>
    <script type="text/javascript">
        var uname = document.getElementById("uname");
        var info = document.getElementById("info");
        uname.onkeyup = function(){
            info.innerHTML = uname.value;
        }
    </script>
</body>
</html>